package com.baor.controller;

import com.baor.fegin.ExceptionManagerFeignClient;
import com.baor.service.EquipmentService;
import com.baor.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RestController
@RequestMapping("/APP/equipment")
public class EquipmentController {
    @Autowired
    private EquipmentService equipmentService;

    @RequestMapping("/getlist")
    public R getList(@RequestBody Map<String,Object> params) {
        return equipmentService.getList(params);
    }

    @RequestMapping("/getinfo/{id}")
    public R getInfo(@PathVariable("id") Integer id) {
        return equipmentService.getInfo(id);
    }
    @RequestMapping("/update")
    public R update(@RequestBody Map<String,Object> params) {
        return equipmentService.update(params);
    }

    @RequestMapping("/getRemovalInfo/{id}")
    public R getRemovalInfo(@PathVariable("id") Integer id) {
        return equipmentService.getRemovalInfo(id);
    }
}
